package com.ks.common.quartz;

import org.quartz.Job;

public enum SchedulerEnum {

    MonitorEmailScheduler(MonitorEmailJob.class,3000,"0 25 8 1/1 * ?"),
//    MonitorEmailScheduler2(MonitorEmailJob2.class,5000,"0/5 * * * * ?")
    ;

    /**job实现类*/
    private Class<? extends Job> jobCls;
    /**cron表达式*/
    private String cronExp;
    /**server启动后，任务运行延迟时间*/
    private long initialDelay;

    private SchedulerEnum(Class<? extends Job> jobCls,long initialDelay,String cronExp){

        this.jobCls = jobCls;
        this.initialDelay = initialDelay;
        this.cronExp = cronExp;
    }

    private SchedulerEnum(Class<? extends Job> jobCls,String cronExp){

      this(jobCls,3000,cronExp);
    }

    public Class<? extends Job> getJobCls() {
        return jobCls;
    }

    public String getCronExp() {
        return cronExp;
    }

    public long getInitialDelay() {
        return initialDelay;
    }
}
